package com.gym.code.generator.impl.service;

import java.util.HashSet;
import java.util.Set;

import com.gym.code.generator.impl.AbstractImplGenerator;
import com.gym.code.generator.model.mapping.layer.LayerGenerateModel;
import com.gym.code.generator.model.mapping.layer.service.IServiceLayerGenerateModel;
import com.gym.code.generator.model.mapping.layer.service.ServiceLayerGenerateModel;

public abstract class AbstractServiceGenerator<T extends ServiceLayerGenerateModel> extends AbstractImplGenerator<T> {

	protected Set<String> generateSpringImport(){
		Set<String> result = new HashSet<String>();
		result.add("org.apache.commons.collections.CollectionUtils");
		result.add("org.springframework.stereotype.Service");
		result.add("org.apache.commons.lang.StringUtils");
		return result;
	}
	
	
	protected Set<String> generateJavaImport(){
		Set<String> result = new HashSet<String>();
		result.add("java.util.Collections");
		return result;
	}
	
	@Override
	protected Set<String> generateFaceImport(LayerGenerateModel model) {
		Set<String> result = new HashSet<String>();
		result.add(model.getPackagePath() +".service."+ ((IServiceLayerGenerateModel)model).getServiceInterfaceName());
		result.add(model.getPackagePath() +".dao."+ ((ServiceLayerGenerateModel)model).getDaoFaceName());
		return result;
	}
	
}
